import java.util.Collection;
import java.util.ArrayList;
import java.util.Arrays;


public class Test2 {
    public static void main(String[] args) {
//        int[] arr = new int[]{1,2,3,4,5,6,7,8,9};
//
//        ArrayList list = new ArrayList(Arrays.asList(arr));
//
//        for (Object obj : list) {
//            System.out.println(obj);
//        }

        ArrayList list = new ArrayList();

        list.add("abc");
        list.add("123");
        list.add(1,"def");

        for (Object obj : list) {
            System.out.println(obj);
        }
    }
}
